<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <title>日本电产智能仓储物流信息系统</title>
    <meta name="keywords" content="日本电产智能仓储物流信息系统">
    <meta name="description" content="日本电产智能仓储物流信息系统">
    <link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
    <link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
    <link href="../static/css/login.min.css" th:href="@{/css/login.min.css}" rel="stylesheet"/>
    <link href="../static/wms/css/ry-ui.css" th:href="@{/wms/css/ry-ui.css?v=3.3.0}" rel="stylesheet"/>
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->
    <link rel="shortcut icon" href="../static/logo.ico" th:href="@{logo.ico}"/>
    <style type="text/css">
        label.error {
            position: inherit;
        }
    </style>
    <script>
        if(window.top !== window.self){
            window.top.location = window.location;
        }
    </script>
    <style>
        .black {
            color: #000000;
        }
        [v-cloak] {
            display: none;
        }
        .center {
            display: flex;
            justify-content: center;
        }
        .signinpanel form {
            background: rgba(255, 255, 255, .7);
        }
        .signup-footer {
            border-top: 1px solid #ffffff;
        }
    </style>
</head>

<body class="signin" style="height: 100vh;overflow: hidden">
<div class="signinpanel" style="margin-top: 15%">
    <div class="center">
        <div class="col-sm-6" id="logindiv">
            <form id="signupForm">
                <h4 class="no-margins black">登录：</h4>
                <h4 style="margin-top: 20px" class="black">欢迎使用 <strong>日本电产智能仓储物流信息系统</strong></h4>
                <input type="text" name="username" class="form-control uname" placeholder="用户名" value="wxy"/>
                <input type="password" name="password" class="form-control pword" placeholder="密码" value="123456"/>
                <select name="classes" class="form-control black hidden" id="jobTimesSel">
                    <option v-for="(item, index) in jobTimes" :key="index" :value="item.pid" :selected="index == 0 ? true : false" v-cloak>{{item.planName}}</option>
                </select>
                <div class="row m-t" th:if="${captchaEnabled==true}">
                    <div class="col-xs-6">
                        <input type="text" name="validateCode" class="form-control code" placeholder="验证码" maxlength="5" autocomplete="off">
                    </div>
                    <div class="col-xs-6">
                        <a href="javascript:void(0);" title="点击更换验证码">
                            <img th:src="@{captcha/captchaImage(type=${captchaType})}" class="imgcode" width="85%"/>
                        </a>
                    </div>
                </div>
                <div class="checkbox-custom hidden" th:classappend="${captchaEnabled==false} ? 'm-t'">
                    <input type="checkbox" id="rememberme" name="rememberme"> <label for="rememberme">记住我</label>
                </div>
                <button class="btn btn-success btn-block" id="btnSubmit" data-loading="正在验证登录，请稍后...">登录</button>
            </form>
        </div>
    </div>
    <div class="signup-footer center">
        <div class="pull-left black">
            <h4>系统版本V1.0</h4>
        </div>
    </div>
</div>

<div style="position: fixed;left: 0;bottom: 0;width: 100%;height: 36px;display: flex;justify-content: center;align-items: center">
    <div style="color: #ffffff">Copyright © 2021 仲西输送设备（佛山）有限公司 | 联系电话：xxxx-xxxxxxxx</div>
</div>
<script th:inline="javascript"> var ctx = [[@{/}]]; var captchaType = [[${captchaType}]]; </script>
<!-- 全局js -->
<script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
<script src="../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
<!-- 验证插件 -->
<script src="../static/ajax/libs/validate/jquery.validate.min.js" th:src="@{/ajax/libs/validate/jquery.validate.min.js}"></script>
<script src="../static/ajax/libs/validate/messages_zh.min.js" th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script src="../static/wms/js/ry-ui.js" th:src="@{/wms/js/ry-ui.js?v=3.3.0}"></script>
<script src="../static/wms/login.js" th:src="@{/wms/login.js}"></script>
<script src="/js/vue.js"></script>
<script th:inline="javascript">
    var app = new Vue({
        el: '#logindiv',
        data: {
            jobTimes: []
        },
        methods: {
            getJobTimes(){
                var that = this;
                $.ajax({
                    cache: true,
                    url: '/planset/findList',
                    type: 'POST',
                    data: {},
                    async: false,
                    error: function(request){
                        $.modal.alertError("系统错误" + request.msg);
                    },
                    success: function(data){
                        let rows = data.rows;
                        for(var row of rows){
                            if(row["totalTime"] != "0"){
                                that.jobTimes.push(row);
                            }
                        }
                    }
                })
            }
        },
        created(){
            this.getJobTimes();
        }
    })
</script>
</body>
</html>
